<template>
    <div class="catgray" 
            @click="$emit('selectCatgray')">
                <el-text truncated><slot/></el-text>
                <div style="display: flex; justify-content: space-around;margin-left: 20px;">
                    <el-button link type="primary" @click="$emit('editCatgray')"><el-icon><Edit/></el-icon></el-button>
                    <el-button link type="primary" @click="$emit('delCatgray')"><el-icon><Close /></el-icon></el-button>
                </div>
            </div>
</template>
<script setup>
import { ref } from 'vue'


defineEmits(['selectCatgray','editCatgray','delCatgray'])


// console.log('我是子组件，接受父组件的data',catgrayList)
</script>
<style scoped>
.catgray{
    display: flex;
    justify-content: space-around; 
    padding:10px;  
    cursor: pointer;
}
.catgray:hover{
    background-color: #EDF5FF;
}
</style>